var path = require('path')

var HtmlWebpackPlugin = require('html-webpack-plugin')
var VueLoaderRlugin = require('vue-loader/lib/plugin')

module.exports = {
    mode: 'production',
    entry: path.join(__dirname,'./src/index.js'),
    output: {
        path: path.join(__dirname,'./dist'),
        filename: 'main.js'
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: path.join(__dirname, './src/index.html'),
            filename: 'index.html'
        }),
        new VueLoaderRlugin
    ],
    module: {
        rules: [
            { test:/\.css$/, use: ['style-loader','css-loader'] },
            { test:/\.(png|jpg|gif|jpeg)$/, use: 'url-loader' },
            { test:/\.vue$/, use: 'vue-loader' },
            { test:/\.(ttf|woff|eot|woff2|svg)$/, use: 'file-loader' }
        ]
    },
    performance: {
        hints: false
    }
}